com.supermap.realspace
类 SceneControl
- java.lang.Object
-
- android.view.View
-
- android.view.SurfaceView
-
- com.supermap.realspace.SceneControl
-
- 所有已实现的接口:
- android.graphics.drawable.Drawable.Callback, android.view.accessibility.AccessibilityEventSource, android.view.KeyEvent.Callback
public class SceneControl extends android.view.SurfaceView
三维场景控件。
-
-
嵌套类概要
嵌套类 限定符和类型 类和说明 static interface
SceneControl.OnUpdateListener
-
从类继承的嵌套类/接口 android.view.View
android.view.View.AccessibilityDelegate, android.view.View.BaseSavedState, android.view.View.DragShadowBuilder, android.view.View.MeasureSpec, android.view.View.OnApplyWindowInsetsListener, android.view.View.OnAttachStateChangeListener, android.view.View.OnClickListener, android.view.View.OnCreateContextMenuListener, android.view.View.OnDragListener, android.view.View.OnFocusChangeListener, android.view.View.OnGenericMotionListener, android.view.View.OnHoverListener, android.view.View.OnKeyListener, android.view.View.OnLayoutChangeListener, android.view.View.OnLongClickListener, android.view.View.OnSystemUiVisibilityChangeListener, android.view.View.OnTouchListener
-
-
字段概要
-
从类继承的字段 android.view.View
ACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA, DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, FIND_VIEWS_WITH_CONTENT_DESCRIPTION, FIND_VIEWS_WITH_TEXT, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, GONE, HAPTIC_FEEDBACK_ENABLED, IMPORTANT_FOR_ACCESSIBILITY_AUTO, IMPORTANT_FOR_ACCESSIBILITY_NO, IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS, IMPORTANT_FOR_ACCESSIBILITY_YES, INVISIBLE, KEEP_SCREEN_ON, LAYER_TYPE_HARDWARE, LAYER_TYPE_NONE, LAYER_TYPE_SOFTWARE, LAYOUT_DIRECTION_INHERIT, LAYOUT_DIRECTION_LOCALE, LAYOUT_DIRECTION_LTR, LAYOUT_DIRECTION_RTL, MEASURED_HEIGHT_STATE_SHIFT, MEASURED_SIZE_MASK, MEASURED_STATE_MASK, MEASURED_STATE_TOO_SMALL, NO_ID, OVER_SCROLL_ALWAYS, OVER_SCROLL_IF_CONTENT_SCROLLS, OVER_SCROLL_NEVER, ROTATION, ROTATION_X, ROTATION_Y, SCALE_X, SCALE_Y, SCREEN_STATE_OFF, SCREEN_STATE_ON, SCROLLBAR_POSITION_DEFAULT, SCROLLBAR_POSITION_LEFT, SCROLLBAR_POSITION_RIGHT, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SOUND_EFFECTS_ENABLED, STATUS_BAR_HIDDEN, STATUS_BAR_VISIBLE, SYSTEM_UI_FLAG_FULLSCREEN, SYSTEM_UI_FLAG_HIDE_NAVIGATION, SYSTEM_UI_FLAG_IMMERSIVE, SYSTEM_UI_FLAG_IMMERSIVE_STICKY, SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN, SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION, SYSTEM_UI_FLAG_LAYOUT_STABLE, SYSTEM_UI_FLAG_LOW_PROFILE, SYSTEM_UI_FLAG_VISIBLE, SYSTEM_UI_LAYOUT_FLAGS, TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_GRAVITY, TEXT_ALIGNMENT_INHERIT, TEXT_ALIGNMENT_TEXT_END, TEXT_ALIGNMENT_TEXT_START, TEXT_ALIGNMENT_VIEW_END, TEXT_ALIGNMENT_VIEW_START, TEXT_DIRECTION_ANY_RTL, TEXT_DIRECTION_FIRST_STRONG, TEXT_DIRECTION_INHERIT, TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, TRANSLATION_X, TRANSLATION_Y, VISIBLE, X, Y
-
-
构造器概要
构造器 构造器和说明 SceneControl(android.content.Context context)
根据当前视图的上下文构造三维场景控件。SceneControl(android.content.Context context, android.util.AttributeSet attrs)
根据指定参数构造一个新的三维场景控件对象。SceneControl(android.content.Context context, SceneType sceneType)
构造函数,根据上下文和SceneType构造一个SceneControl对象。
-
方法概要
所有方法 实例方法 具体方法 限定符和类型 方法和说明 void
addTrackedListener(Tracked3DListener listener)
添加跟踪结束事件监听器。void
addTrackingListener(Tracking3DListener listener)
添加跟踪事件监听器。void
displayDistanceOrArea(Point3Ds point3Ds)
根据点刷新距离和面积测量void
displayMeasure(int x, int y)
根据屏幕坐标量算高度 距离 面积Action3D
getAction()
返回三维场景操作状态Frame
getFrame()
获取Google ARCore的FrameARFrame
getFrameHW()
获取华为 AREngine的ARFrameboolean
getIsManageARSession()
获取是否由SceneControl更新SessionScene
getScene()
返回当前场景控件中的场景对象。Session
getSession()
获取Google ARCore的SessionARSession
getSessionHW()
获取华为AREngine的ARSessionboolean
isNavigationControlVisible()
返回导航条是否可见。boolean
isStatusBarVisible()
返回状态条是否可见。boolean
onTouchEvent(android.view.MotionEvent event)
返回当前场景中的手势是否为view所接收。void
pauseSession()
暂停ARSessionvoid
postRunnable(java.lang.Runnable runnable)
向渲染线程添加一个任务。void
removeTrackedListener(Tracked3DListener listener)
移除跟踪结束事件监听器。void
removeTrackingListener(Tracking3DListener listener)
移除跟踪事件监听器。void
resumeSession()
恢复ARSessionvoid
sceneControlInitedComplete(SceneControlInitedCallBackListenner listenner)
场景控件初始化回调监听。void
setAction(Action3D value)
设置三维场景操作状态void
setFrame(Frame frame)
设置Google ARCore的Framevoid
setFrameHW(ARFrame frame)
设置华为 AREngine的ARFramevoid
setGestureDetector(android.view.GestureDetector gsDetector)
设置用户手势识别器。void
setIsManageARSession(boolean isManage)
设置SceneControl是否更新Sessionvoid
setNavigationControlVisible(boolean value)
设置导航条是否可见。void
setOnTouchListener(android.view.View.OnTouchListener listener)
设置触控监听器。void
setOnUpdateListener(SceneControl.OnUpdateListener m_onUpdateListener)
void
setSession(Session session)
设置Google ARCore的Sessionvoid
setSessionHW(ARSession session)
设置华为AREngine的ARSessionvoid
setStatusBarVisible(boolean value)
设置状态条是否可见。-
从类继承的方法 android.view.SurfaceView
draw, gatherTransparentRegion, getHolder, setSecure, setVisibility, setZOrderMediaOverlay, setZOrderOnTop
-
从类继承的方法 android.view.View
addChildrenForAccessibility, addFocusables, addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, addTouchables, animate, announceForAccessibility, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, clearFocus, combineMeasuredStates, computeScroll, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchApplyWindowInsets, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, findFocus, findViewById, findViewsWithText, findViewWithTag, focusSearch, forceLayout, generateViewId, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBaseline, getBottom, getCameraDistance, getClipBounds, getContentDescription, getContext, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusables, getFocusedRect, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getId, getImportantForAccessibility, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOverlay, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getResources, getRight, getRootView, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollX, getScrollY, getSolidColor, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTop, getTouchables, getTouchDelegate, getTranslationX, getTranslationY, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, hasFocus, hasFocusable, hasOnClickListeners, hasOverlappingRendering, hasTransientState, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateDrawable, isActivated, isAttachedToWindow, isClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isInEditMode, isInLayout, isInTouchMode, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isOpaque, isPaddingRelative, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, jumpDrawablesToCurrentState, layout, measure, offsetLeftAndRight, offsetTopAndBottom, onApplyWindowInsets, onCancelPendingInputEvents, onCheckIsTextEditor, onCreateInputConnection, onDragEvent, onFilterTouchEventForSecurity, onFinishTemporaryDetach, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onPopulateAccessibilityEvent, onRtlPropertiesChanged, onScreenStateChanged, onStartTemporaryDetach, onTrackballEvent, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, performAccessibilityAction, performClick, performHapticFeedback, performHapticFeedback, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestRectangleOnScreen, requestRectangleOnScreen, resolveSize, resolveSizeAndState, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityLiveRegion, setActivated, setAlpha, setAnimation, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBottom, setCameraDistance, setClickable, setClipBounds, setContentDescription, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusableInTouchMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setImportantForAccessibility, setKeepScreenOn, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLongClickable, setMinimumHeight, setMinimumWidth, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnSystemUiVisibilityChangeListener, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPressed, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollContainer, setScrollX, setScrollY, setSelected, setSoundEffectsEnabled, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTop, setTouchDelegate, setTranslationX, setTranslationY, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setWillNotCacheDrawing, setWillNotDraw, setX, setY, showContextMenu, startActionMode, startAnimation, startDrag, toString, unscheduleDrawable, unscheduleDrawable, willNotCacheDrawing, willNotDraw
-
-
-
-
构造器详细资料
-
SceneControl
public SceneControl(android.content.Context context)
根据当前视图的上下文构造三维场景控件。- 参数:
context
- 当前视图运行的上下文,通过此类可访问当前应用程序的资源和类,也包括一些应用级别操作。Context 类型说明请参加Android SDK 开发文档
-
SceneControl
public SceneControl(android.content.Context context, android.util.AttributeSet attrs)
根据指定参数构造一个新的三维场景控件对象。- 参数:
context
- 当前视图运行的上下文,通过此类可访问当前应用程序的资源和类,也包括一些应用级别操作。attrs
- XML文件标签属性集合。Context和AttributeSet类型说明请参加Android SDK 开发文档
-
SceneControl
public SceneControl(android.content.Context context, SceneType sceneType)
构造函数,根据上下文和SceneType构造一个SceneControl对象。- 参数:
context
- 指定context 。sceneType
- 指定sceneType。
-
-
方法详细资料
-
getScene
public Scene getScene()
返回当前场景控件中的场景对象。- 返回:
- 获取的场景对象。
注意: 获取场景对象前,必须先显示三维场景。
-
getAction
public Action3D getAction()
返回三维场景操作状态- 返回:
- 场景控件中场景的当前操作状态。
-
setAction
public void setAction(Action3D value)
设置三维场景操作状态- 参数:
value
- 三维场景操作类型。
-
setGestureDetector
public void setGestureDetector(android.view.GestureDetector gsDetector)
设置用户手势识别器。- 参数:
gsDetector
- 手势识别类对象, 不可为空。GestureDetector类 是 Android SDK 提供的手势识别类,通过此类可实现如单击、双击、长按、滑动、拖动等不同手势的识别。
-
addTrackingListener
public void addTrackingListener(Tracking3DListener listener)
添加跟踪事件监听器。- 参数:
listener
- 跟踪事件监听器
-
removeTrackingListener
public void removeTrackingListener(Tracking3DListener listener)
移除跟踪事件监听器。- 参数:
listener
- 跟踪事件监听器
-
addTrackedListener
public void addTrackedListener(Tracked3DListener listener)
添加跟踪结束事件监听器。- 参数:
listener
- 跟踪结束事件监听器
-
removeTrackedListener
public void removeTrackedListener(Tracked3DListener listener)
移除跟踪结束事件监听器。- 参数:
listener
- 跟踪结束事件监听器
-
setOnTouchListener
public void setOnTouchListener(android.view.View.OnTouchListener listener)
设置触控监听器。- 覆盖:
setOnTouchListener
在类中android.view.View
- 参数:
listener
- 触控监听器
-
onTouchEvent
public boolean onTouchEvent(android.view.MotionEvent event)
返回当前场景中的手势是否为view所接收。- 覆盖:
onTouchEvent
在类中android.view.View
- 参数:
event
- 操作手势事件- 返回:
- 已识别当前手势返回true,否则返回false。
-
isStatusBarVisible
public boolean isStatusBarVisible()
返回状态条是否可见。- 返回:
- 状态条是否可见。
-
setStatusBarVisible
public void setStatusBarVisible(boolean value)
设置状态条是否可见。- 参数:
value
- 一个布尔值,指定状态条是否可见。
-
setNavigationControlVisible
public void setNavigationControlVisible(boolean value)
设置导航条是否可见。- 参数:
value
- 一个布尔值,指定导航条是否可见。
-
isNavigationControlVisible
public boolean isNavigationControlVisible()
返回导航条是否可见。- 返回:
- 导航条是否可见。
-
sceneControlInitedComplete
public void sceneControlInitedComplete(SceneControlInitedCallBackListenner listenner)
场景控件初始化回调监听。- 参数:
listenner
- 指定场景控件初始化的监听器。
-
postRunnable
public void postRunnable(java.lang.Runnable runnable)
向渲染线程添加一个任务。- 参数:
runnable
- 指定一个Runnable。
-
displayMeasure
public void displayMeasure(int x, int y)
根据屏幕坐标量算高度 距离 面积- 参数:
x
- 屏幕x坐标y
- 屏幕y坐标
-
displayDistanceOrArea
public void displayDistanceOrArea(Point3Ds point3Ds)
根据点刷新距离和面积测量- 参数:
point3Ds
-
-
setOnUpdateListener
public void setOnUpdateListener(SceneControl.OnUpdateListener m_onUpdateListener)
-
pauseSession
public void pauseSession()
暂停ARSession
-
resumeSession
public void resumeSession()
恢复ARSession
-
getSessionHW
public ARSession getSessionHW()
获取华为AREngine的ARSession- 返回:
- AREngine中的ARSession
-
setSessionHW
public void setSessionHW(ARSession session)
设置华为AREngine的ARSession- 参数:
session
- ARSession实例对象
-
getSession
public Session getSession()
获取Google ARCore的Session- 返回:
- ARCore中的Session
-
setSession
public void setSession(Session session)
设置Google ARCore的Session- 参数:
session
- Session实例对象
-
setFrame
public void setFrame(Frame frame)
设置Google ARCore的Frame- 参数:
frame
- ARCore的Frame
-
getFrame
public Frame getFrame()
获取Google ARCore的Frame- 返回:
- ARCore的Frame
-
setFrameHW
public void setFrameHW(ARFrame frame)
设置华为 AREngine的ARFrame- 参数:
frame
- AREngine的ARFrame
-
getFrameHW
public ARFrame getFrameHW()
获取华为 AREngine的ARFrame- 返回:
- AREngine的ARFrame
-
setIsManageARSession
public void setIsManageARSession(boolean isManage)
设置SceneControl是否更新Session- 参数:
isManage
- 是否由SceneControl更新Session,默认为true
-
getIsManageARSession
public boolean getIsManageARSession()
获取是否由SceneControl更新Session- 返回:
- 是否由SceneControl更新Session
-
-